<template>
  <div class="mobile">
    <div class="m-bar">
      中台数据专员 - 赵XX
    </div>
    <router-view />
    <van-tabbar route>
      <van-tabbar-item to="/mobile/midsj/score" icon="balance-o">积分管理</van-tabbar-item>
      <van-tabbar-item to="/mobile/midsj/analysis" icon="shop-o">数据分析</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import Tabbar from 'vant/lib/tabbar'
import TabbarItem from 'vant/lib/tabbar-item'
import 'vant/lib/tabbar/style'
import 'vant/lib/tabbar-item/style'
import { getSalon } from '@/api/txs'
import Rate from 'vant/lib/rate'
import 'vant/lib/rate/style'

export default {
  components: {
    [Tabbar.name]: Tabbar,
    [TabbarItem.name]: TabbarItem,
    [Rate.name]: Rate
  },
  data () {
    return {
      salon: {
        sname: ''
      },
      starValue: 3
    }
  },
  computed: {
    ...mapGetters([
      'openId'
    ])
  },
  created () {
    this.fetchData()
  },
  methods: {
    fetchData () {
      getSalon(this.openId).then(res => {
        this.salon = res.data.data
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.mobile {
  background-color: #f7f8fa;
  height: 100%;
  .m-bar{
    background-color: #fff;
    color:#C31171;
    font-size: 30px;
    line-height: 80px;
    text-align: center;
    box-shadow: 0px 0px 10px rgb(201, 201, 201);
    margin-bottom: 10px;
  }
  .m-summary{
    display: flex;
    font-size: 30px;
    // line-height: 80px;
    // margin-bottom: 20px;
    justify-content: space-between;
    width: 100%;
    padding: 0 50px 0 50px;
  }
}
</style>
